package com.shrct.businessprocess.product.impl;

import com.shrct.businessprocess.product.RCProductCategory;
import com.shrct.businessprocess.product.proxy.RCProductCategoryProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCPRODUCTCATEGORY_TYPE")
public class RCProductCategoryImpl extends CodeImpl implements RCProductCategory {
  public RCProductCategoryImpl() {
    super();
  }
  
  public static RCProductCategory create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.product.RCProductCategory rCProductCategory = new com.shrct.businessprocess.product.impl.RCProductCategoryImpl(
    );
    objectFactory.create(rCProductCategory);
    return rCProductCategory;			
    
  }
  
  public static RCProductCategory createRCProductCategoryImpl(final IObjectFactory objectFactory, final Procedure1<RCProductCategory> init) {
    com.shrct.businessprocess.product.RCProductCategory rCProductCategory = new com.shrct.businessprocess.product.impl.RCProductCategoryImpl(
    );
    objectFactory.create(rCProductCategory);
    init.apply(rCProductCategory);
    
    return rCProductCategory;			
    
  }
  
  public RCProductCategoryProxy toProxy() {
    com.shrct.businessprocess.product.proxy.RCProductCategoryProxy proxy = new com.shrct.businessprocess.product.proxy.RCProductCategoryProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
